<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>审计系统 - 内部控制测试</title>
		<link
			rel="stylesheet"
			href="{{ url_for('static', filename='css/style.css') }}"
		/>
	</head>
	<body>
		<div class="container">
			<div class="card">
				<a href="{{ url_for('index') }}" class="btn btn-back">返回项目列表</a>
				<h2>内部控制测试</h2>
				<h3>测试列表</h3>
				<a
					href="{{ url_for('create_internal_control_test_form', project_id=project_id) }}"
					class="btn"
					>创建测试</a
				>
				<!-- <a
					href="{{ url_for('generate_internal_control_report', project_id=project_id) }}"
					class="btn"
					>生成报告</a
				> -->
				<form
					action="{{ url_for('generate_internal_control_report', project_id=project_id) }}"
					method="POST"
					style="display: inline"
				>
					<button type="submit" class="btn">生成报告</button>
				</form>
				<table class="table">
					<thead>
						<tr>
							<th>ID</th>
							<th>测试类型</th>
							<th>描述</th>
							<th>结果</th>
							<th>状态</th>
							<th>创建时间</th>
						</tr>
					</thead>
					<tbody>
						{% for test in tests %}
						<tr>
							<td>{{ test.id }}</td>
							<td>{{ test.test_type }}</td>
							<td>{{ test.description }}</td>
							<td>{{ test.result }}</td>
							<td>{{ test.status }}</td>
							<td>{{ test.created_at }}</td>
						</tr>
						{% endfor %}
					</tbody>
				</table>
			</div>
		</div>
	</body>
</html>
